package cn.com.blueInfo.HaiYuan.business.drugs.controller;

import cn.com.blueInfo.HaiYuan.business.drugs.service.DrugsEffectService;
import cn.com.blueInfo.utils.result.BootstrapTable;
import cn.com.blueInfo.utils.result.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 药品功能功效信息管理
 * @ClassName: DrugsEffectController
 * @author suxch
 * @date 2019年6月19日  下午9:03:21
 */
@RestController
@RequestMapping("/operation/business/drugsEffect")
public class DrugsEffectController {

    @Autowired
    private DrugsEffectService effectService;

    /**
     * 分页查询药品功能功效信息
     * @Title: queryDrugsEffectInfoByPage
     * @param request
     * @return BootstrapTable
     * @throws
     */
    @RequestMapping("/queryDrugsEffectInfoByPage.do")
    public BootstrapTable queryDrugsEffectInfoByPage(HttpServletRequest request) {
        return effectService.queryDrugsEffectDataByPage(request);
    }

    /**
     * 获取最大排序编号
     * @Title: getMaxOrderNumber
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/getMaxOrderNumber.do")
    public ResultInfo getMaxOrderNumber(HttpServletRequest request) {
        return effectService.queryMaxOrderNumber(request);
    }

    /**
     * 新增药品功能功效信息
     * @Title: addDrugsEffectinfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/addDrugsEffectInfo.do")
    public ResultInfo addDrugsEffectInfo(HttpServletRequest request) {
        return effectService.addDrugsEffectData(request);
    }

    /**
     * 更新药品功能功效信息
     * @Title: updateDrugsEffectInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/updateDrugsEffectInfo.do")
    public ResultInfo updateDrugsEffectInfo(HttpServletRequest request) {
        return effectService.updateDrugsEffectData(request);
    }

    /**
     * 删除药品功能功效信息
     * @Title: deleteDrugsEffectData
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/deleteDrugsEffectData.do")
    public ResultInfo deleteDrugsEffectData(HttpServletRequest request) {
        return effectService.deleteDrugsEffectData(request);
    }

}
